<?php

class Form_Cadastro extends Zend_Form
{
	public function init()
	{
		$this->setMethod('Post');
		$this->setAction('');

		$this->getInfoPessoa();
		$this->getLogradouro();

        $this->addElement(new Zend_Form_Element_Submit('Enviar'));

	}

	
	private function getInfoPessoa(){
		$this->addElement($this->createElement('text', 'NOME', array(
							'label' 	=> 'Nome',
						  	'required' 	=> true,
						  	'filters'	=> array('StringToUpper'),
						  	'maxlength'	=> 50,
						  	'size'	 	=> 50)));

         $this->addElement($this->createElement('text', 'NR_IDENT', array(
        				 	'label' 	=> 'Nr Identidade',
						  	'required' 	=> true,
						  	'filters'	=> array('StringToUpper'),
						  	'maxlength'	=> 9,
						  	'size'	 	=> 9)));

         $this->addElement($this->createElement('text', 'DATA_NASC', array(
        				 	'label' 	=> 'Data Nascimento',
         					'title'     => 'dd/mm/aaaa',
						  	'required' 	=> true,
						  	'filters'	=> array('StringToUpper'),
						  	'maxlength'	=> 10,
						  	'size'	 	=> 10)));

         $this->addElement($this->createElement('text', 'TELEFONE', array(
        				 	'label' 	=> 'Telefone',
						  	'filters'	=> array('StringToUpper'),
						  	'maxlength'	=> 8,
						  	'size'	 	=> 8)));

          $this->addElement($this->createElement('text', 'CELULAR', array(
        				 	'label' 	=> 'Celular',
						  	'filters'	=> array('StringToUpper'),
						  	'maxlength'	=> 8,
						  	'size'	 	=> 8)));

          $this->addElement($this->createElement('text', 'EMAIL', array(
        				 	'label' 	=> 'E-mail',
						  	'filters'	=> array('StringToUpper'),
						  	'maxlength'	=> 60,
						  	'size'	 	=> 20)));
	}

	private function getLogradouro(){
		$this->addElement($this->createElement('text', 'BAIRRO', array(
        				 	'label' 	=> 'Bairro',
						  	'required' 	=> true,
						  	'filters'	=> array('StringToUpper'),
						  	'maxlength'	=> 25,
						  	'size'	 	=> 25)));

        $this->addElement($this->createElement('text', 'CIDADE', array(
        				 	'label' 	=> 'Cidade',
						  	'required' 	=> true,
						  	'filters'	=> array('StringToUpper'),
						  	'maxlength'	=> 30,
						  	'size'	 	=> 30)));

        $this->addElement($this->createElement('text', 'CEP', array(
        				 	'label' 	=> 'Cep',
						  	'required' 	=> true,
						  	'filters'	=> array('StringToUpper'),
						  	'maxlength'	=> 8,
						  	'size'	 	=> 8)));

        $this->addElement($this->createElement('text', 'ENDERECO', array(
        				 	'label' 	=> 'Endereco',
						  	'required' 	=> true,
						  	'filters'	=> array('StringToUpper'),
						  	'maxlength'	=> 60,
						  	'size'	 	=> 60)));
	}

}